package top.fzqblog.action;

import org.springframework.stereotype.Controller;
import top.fzqblog.model.User;

import javax.servlet.http.HttpSession;

/**
 * Created by 抽离 on 2017/9/1 0001.
 */
@Controller
public class BaseAction {

    User getCurrentUser(HttpSession session){
        return (User) session.getAttribute("user");
    }

    boolean checkWxLogin(HttpSession session){
        return session.getAttribute("wxUser") != null;
    }

    User getCurrentWxUser(HttpSession session){
        return (User) session.getAttribute("wxUser");
    }
}
